Frames No Frames Cognitoware API v2009512
Cognitoware.Robotics.dll
Cognitoware.Mathematics.Probability

Class RandomDistribution<T>
T: The type of the values whose probabilities are represented in the distribution.

System.Object
Cognitoware.Mathematics.Probability.RandomDistribution<T>


Summary

An abstract class for a random distribution over values of type T.

Constructor Summary

RandomDistribution()

Method Summary

AliasAs()
Attempts to convert this distribution into another type.
Equals(Object)
Inherited from System.Object
Finalize()
Inherited from System.Object
GetEntropy(IEnumerable<T>)
Estimates the entropy of a distribution.
GetHashCode()
Inherited from System.Object
GetType()
Inherited from System.Object
MemberwiseClone()
Inherited from System.Object
ProbabilityOf(T)
Returns the probability of a discrete event or the probability density of a continuous event.
Sample(Random)
Selects a random value from the distribution with a probability consistent with the distribution.
ToString()
Inherited from System.Object

Details

An abstract class for a random distribution over values of type T. The distribution is represented by the equation P(T). This class does not provide a representation of the distribution. Classes like Binomial and DistributionCounter provide specific data structures that are useful in different circumstances.

Constructor Details

family RandomDistribution()

Method Details

public virtual A AliasAs()
Some distributions are easily converted into other distributions. For example, a GaussianMoment can easily be converted into a GaussianCanonical with no loss of information. A subclass of RandomDistribution may choose to implement AliasAs to support whatever distribution conversions make sense for it. By default, AliasAs simply uses the "as" operation to convert the references to another type. If the conversion fails, a null reference is returned.

Returns:

A referece of the specified type or null of the conversion failed.

public Double GetEntropy(IEnumerable<T> iEnumerable)
Entropy provides the number of bits of uncertainty in the distribution. A distribution with a single known value has zero uncertainty and zero entropy. A distribution with two equally probable values have 1 bit of uncertainty. Continuous distributions can potentially have infinite entropy. The user must provide a set of samples to approximate the distribution.

Parameters:

iEnumerable - The set of samples over which the entropy will be calculated.

Returns:

The estimated entropy of the distribution.

public virtual Double ProbabilityOf(T t)
Returns the probability of a discrete event or the probability density of a continuous event. This abstract method must be implemented by a subclass.

Parameters:

t - The value whose probability is returned.

Returns:

The probability of t.

public virtual T Sample(Random select)
Selects a random value from the distribution with a probability consistent with the distribution. This abstract method must be implemented by a subclass.

Parameters:

select - A random number generator used to select the value.

Returns:

A value of T.


Questions, Comments and Licensing
Copyright 2009 Cognitoware. All rights reserved.